package ${attach.daoPackage};

import java.util.List;
import java.util.Map;
import ${attach.beanPackage}.${pascalName};

import org.springframework.stereotype.Repository;

/**
 * Dao
 * ${tableComment}${tableName}
 * <p>
 * @author Mr.css on 2018-6-20
 */
@Repository
public interface ${pascalName}Dao {
    /**
     * 增
     *
     * @param ${camelName} pojo
     * @return affected rows
     */
    int insert(${pascalName} ${camelName});

    /**
     * 增
     *
     * @param ${camelName} pojo
     * @return affected rows
     */
    int insertSelective(${pascalName} ${camelName});

    /**
     * 删
     *
     * @param id id
     * @return affected rows
     */
    int deleteById(String id);

    /**
     * 删
     *
     * @param ${camelName} pojo
     * @return affected rows
     */
    int deleteSample(${pascalName} ${camelName});

    /**
     * 改
     *
     * @param ${camelName} pojo
     * @return affected rows
     */
    int updateSampleById(${pascalName} ${camelName});

    /**
     * 查
     *
     * @param id id
     * @return pojo
     */
    ${pascalName} selectById(String id);

    /**
     * 查询类似的列表
     *
     * @param ${camelName} pojo
     * @return List
     */
    List<${pascalName}> selectSample(${pascalName} ${camelName});

    /**
     * 查询类似的1个
     *
     * @param ${camelName} pojo
     * @return pojo
     */
    ${pascalName} selectSampleOne(${pascalName} ${camelName});

    /**
     * 查列表
     *
     * @param params map
     * @return listMap
     */
    List<${pascalName}> selectList(Map<String, Object> params);
}
